<template>
  <section class="main">
    <input id="toggle-all" class="toggle-all" type="checkbox" />
    <label for="toggle-all">全部标记为已完成</label>
    <ul class="todo-list">
     
      <li :class="{ completed: item.isDone }" v-for="item in list" :key="item.id">
        <div class="view">
          <input class="toggle" type="checkbox" :checked="item.isDone" />
          <label>{{ item.name }}</label>
          <button class="destroy" @click="$emit('del', item.id)"></button>
        </div>
        <input class="edit" value="Create a TodoMVC template" />
      </li>
    </ul>
  </section>
</template>

<script>
export default {
  props: {
    list: Array
  }
}
</script>

<style>

</style>